package com.job.dao.impl;

import org.springframework.stereotype.Repository;

import com.job.common.dao.BaseDaoImpl;
import com.job.dao.UserDao;
import com.job.model.User;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {

	@Override
	public User get(String name, String password) {

		return (User) sessionFactory.getCurrentSession()
				.createQuery("from User u where u.login=:name and u.pass=:password").setParameter("name", name)
				.setParameter("password", password).uniqueResult();
	}

}
